use hash_int::hash_int::int_hash;

#[test]
fn test_int_hash() {
    const NUM_TEST_VALUES: usize = 200;
    let mut array = [0; NUM_TEST_VALUES];

    // Initialize the array with values from 0 to NUM_TEST_VALUES - 1
    for i in 0..NUM_TEST_VALUES {
        array[i] = i as i32;
    }

    // Check that all hash values are unique
    for i in 0..NUM_TEST_VALUES {
        for j in i + 1..NUM_TEST_VALUES {
            assert_ne!(int_hash(&array[i]), int_hash(&array[j]));
        }
    }

    // Check that two variables with the same value have the same hash
    let i = 5000;
    let j = 5000;
    assert_eq!(int_hash(&i), int_hash(&j));
}